<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<!-- begin header -->
<header>
    <div class="top-nav hidden-xs hidden-sm">
        <div class="container">
            <div class="row">
                <div class="col-md-7 col-sm-7 col-xs-12">
                    <div class="right-nav">
                        <ul th:if="${session.user == null}">
                            <li><a href="/register"><i class="ion-ios-personadd fa-1a" aria-hidden="true" style="color: #00aaaa"></i>创建账户</a></li>
                            <li><a href="/login"><i class="ion-log-in fa-1a" aria-hidden="true" style="color: #00d95a"></i>登录</a></li>
                        </ul>
                        <ul th:if="${session.user != null}">
                            <li><a th:href="@{'/personInfo/detail/'+${session.user.id}}"><i class="fa fa-user" aria-hidden="true" style="color: #0a6aa1"></i>[[${session.user.username}]]</a></li>
                            <li><a th:href="@{'/logout'}" ><i class="fa fa-remove" aria-hidden="true" style="color: #e02222"></i>登出</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="bottom">
        <div class="container">
            <div class="row">
                <div class="col-md-3 col-sm-8 col-xs-7 logo">
                    <a href="#" title="Clickbuy"><img src="/assets/xximg/title.jpg" alt="images" class="img-reponsive"></a>
                </div>
                <div class="col-md-9 col-sm-4 col-xs-5 nextlogo">
                    <div class="block block-2">
                        <div class="cart">
                            <a href="#" title="" id="label3" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                <div class="photo photo-cart">
                                    <img src="/assets/img/cart.png" alt="images" class="img-reponsive">
                                    <span class="lbl">[[${goodsCount}]]</span>
                                </div>
                                <p class="inform inform-cart">
                                    <span class="strong">购物车<br></span>
                                    <span class="price-cart">￥[[${total}]]</span>
                                </p>
                            </a>
                            <div class="dropdown-menu dropdown-cart" aria-labelledby="label3">
                                <ul id="cartGood">
                                    <li th:each="cartGood:${cartGoods}">
                                        <div class="item-order">
                                            <div class="item-photo">
                                                <a th:href="@{'/goods/detail/'+${cartGood.goodsId}}"><img th:src="${cartGood.goodsImg}" alt="images" class="img-responsive" width="65px" height="70px"></a>
                                            </div>
                                            <div class="item-content">
                                                <h3><a th:href="@{'/goods/detail/'+${cartGood.goodsId}}" title="">[[${cartGood.goodsName}]]</a></h3>
                                                <p class="price black">[[${cartGood.goodsPrice}]]</p>
                                                <p class="quantity">x[[${cartGood.buyCount}]]</p>
                                            </div>
                                        </div>
                                        <div class="btn-delete"><a href="javascript:void(0);" title="" class="btndel" th:onclick="'deleteGoods('+${cartGood.goodsId}+')'">x</a></div>
                                    </li>
                                </ul>
                                <div class="content-1">
                                    <span class="total">总共: <strong class="price black">[[${total}]]</strong></span>
                                    <span class="quantity"><strong class="number">[[${goodsCount}]]</strong> products</span>
                                </div>
                                <div class="content-2">
                                    <a th:if="${session.user != null}" th:href="@{'/cart/detail/'+${session.user.id}}" class="addcart">去支付</a>
                                    <a th:if="${session.user == null}" href="/login" class="viewport" style="color: green">请先登录</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="block block-1">
                        <div class="protect">
                            <div class="photo">
                                <svg width="28" height="33" id="Capa_1" data-name="Capa 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 180.05 214.27">
                                    <title>security</title>
                                    <path d="M196.93,55.17c-.11-5.78-.21-11.25-.21-16.54a7.5,7.5,0,0,0-7.5-7.5c-32.07,0-56.5-9.22-76.85-29a7.5,7.5,0,0,0-10.46,0c-20.35,19.79-44.77,29-76.84,29a7.5,7.5,0,0,0-7.5,7.5c0,5.29-.1,10.76-.22,16.54-1,53.84-2.44,127.57,87.33,158.68a7.49,7.49,0,0,0,4.91,0C199.36,182.74,198,109,196.93,55.17ZM107.13,198.81c-77-28-75.82-89.23-74.79-143.35.06-3.25.12-6.4.16-9.48,30-1.27,54.06-10.37,74.63-28.28,20.57,17.91,44.59,27,74.63,28.28,0,3.08.1,6.23.16,9.48C183,109.58,184.12,170.84,107.13,198.81Z" transform="translate(-17.11 0)" />
                                    <path d="M133,81.08l-36.2,36.2L81.31,101.83a7.5,7.5,0,0,0-10.61,10.61l20.75,20.75a7.5,7.5,0,0,0,10.61,0l41.5-41.5A7.5,7.5,0,1,0,133,81.08Z" transform="translate(-17.11 0)" />
                                </svg>
                            </div>
                            <p class="inform">
                                <span class="strong">信息<br></span> 安全
                            </p>
                        </div>
                        <div class="return">
                            <div class="photo">
                                <svg width="30" height="30" id="Capa_2" data-name="Capa 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 612 612.85">
                                    <title>update-arrows</title>
                                    <path d="M600.48,221.79c-14.43-50.5-40.14-94.33-77.94-132.13a300.48,300.48,0,0,0-100-66.57C385,7.84,346.58,0,306.78,0V37.47c69.91,0,138.93,27,190,78.28A264.15,264.15,0,0,1,564.7,231.16c12.55,43.87,14.38,88,4.68,132.47A261.77,261.77,0,0,1,509.83,482l-52.18-51.18V558.33l130.13,2-52.18-52.18Q587.78,448.93,604.84,373A301.45,301.45,0,0,0,600.48,221.79Z" transform="translate(-0.43)" />
                                    <path d="M47.85,382A267.44,267.44,0,0,1,43.5,249.56,263.58,263.58,0,0,1,103.38,130.8l52.18,51.85V54.53L25.44,53.19l51.85,51.52Q25.11,163.92,8,239.85a301.82,301.82,0,0,0,4.35,151.54c14.34,50.2,40.14,94,77.95,131.81a300.35,300.35,0,0,0,100,66.57,306.59,306.59,0,0,0,116.42,23.08v-36.8a267,267,0,0,1-190.35-78.94C83.54,464.09,60.41,425.9,47.85,382Z" transform="translate(-0.43)" />
                                </svg>
                            </div>
                            <p class="inform">
                                <span class="strong">免费<br></span> 退换
                            </p>
                        </div>
                    </div>
                    <div class="search hidden-xs hidden-sm">
                        <form action="search" class="search-form">
                            <input type="text" name="search" class="form-control" placeholder="在这里搜索">
                            <button type="submit" class="search-icon"></button>
                        </form>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="menu">
        <div class="container">
            <div class="row">
                <div class="col-md-3 col-sm-4 col-xs-6 column-left">
                    <aside id="column-left">
                        <nav class="navbar-default">
                            <div class="menu-heading js-nav-menu">全部分类</div>
                            <div class="vertical-wrapper v3 js-dropdown-menu">
                                <ul class="level0">
                                    <li th:each="category : ${categories}">
                                        <a th:href="@{'/frontCategory/list/'+${category.id}}">[[${category.categoryName}]]</a>
                                        <div class="dropdown-content" >
                                            <ul class="level1">
                                                <li class="sub-menu col-3">
                                                    <ul class="level2">
                                                        <li class="col-inner" th:each="categoryTwo : ${categoryTwos}" th:if="${categoryTwo.categoryId == category.id}"><a th:href="@{'/buttonSearch?buttonSearch='+${categoryTwo.twoName}}">[[${categoryTwo.twoName}]]</a></li>
                                                    </ul>
                                                </li>
                                            </ul>
                                            <div class="clearfix"></div>
                                            <div class="banner">
                                                <span><img src="img/megamenubanner.png" alt="images" class="img-responsive"></span>
                                            </div>
                                        </div>
                                    </li>
                                    <li ><a href="#">更多</a></span></li>
                                </ul>
                            </div>
                        </nav>
                    </aside>
                </div>
                <div class="col-md-9 col-sm-8 col-xs-6 column-right">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
                        <span class="menu-title">MENU</span>
                    </button>
                    <div class="collapse navbar-collapse" id="myNavbar">
                        <ul class="menubar js-menubar">
                            <li class=" menu-homepage menu-item-has-child dropdown">
                                <a href="/" title="home"><i class="fa fa-home"></i>主页</a>
                                <span class="plus js-plus-icon"></span>
                            </li>
                            <li class="menu-collection-page menu-item-has-child dropdown">
                                <a th:href="@{'/frontCategory/subheading/2'}" title="new">白菜市场</a>
                            </li>
                            <li class="dropdown menu-blog-page menu-item-has-child">
                                <a th:href="@{'/frontCategory/subheading/1'}" title="Blog">精选市场</a>
                            </li>
                            <li class="dropdown menu-blog-page menu-item-has-child">
                                <a th:href="@{'/frontCategory/list/1'}" title="Blog">二手手机</a>
                            </li>
                            <li class="dropdown menu-blog-page menu-item-has-child">
                                <a th:href="@{'/frontCategory/list/2'}" title="Blog">二手数码</a>
                            </li>
                            <li class="dropdown menu-blog-page menu-item-has-child">
                                <a th:href="@{'/frontCategory/list/3'}" title="Blog">二手图书</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</header>
<!-- end header -->